package com.example.servicefeign.controller;


import com.alibaba.fastjson.JSONObject;
import com.example.servicefeign.service.ServiceLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @Autowired
    public ServiceLogin serviceLogin;

    @GetMapping(value = "/login")
    public JSONObject sayLogin(@RequestParam("username") String name, @RequestParam(value = "password") String pwd) {
        return  serviceLogin.sayLoginFromClientOne(name, pwd);
    }
}
